package com.lz.football.module.trainingcamp
{
	import com.liangzhong.constants.TipsConst;
	import com.liangzhong.model.playerCenter.vo.PlayerVo;
	import com.lz.football.module.explore.item.PlayerBaseItem;
	
	import flash.events.MouseEvent;
	
	import lz.controls.managers.TipsManager;

	/**
	 *训练营球员item 
	 * @author Administrator
	 * 
	 */	
	public class TrainingcampPlayerItem extends PlayerBaseItem
	{
		public function TrainingcampPlayerItem()
		{
			super();
		}
//		override public function addEvtListener():void
//		{
//			this.addEventListener(MouseEvent.ROLL_OUT,onMouseRollOut);
//			this.addEventListener(MouseEvent.ROLL_OVER,onMouseRollOver);
//			this.addEventListener(MouseEvent.CLICK,onClickHandler);
//		}
		
		override public function onMouseClick(event:MouseEvent):void
		{
			// TODO Auto-generated method stub
			TipsManager.hide();
			if(callBack != null)callBack(this);
			
		}
		override public function onMouseRollOut(event:MouseEvent):void
		{
//			super.onMouseRollOut(event);
			TipsManager.hide();
			if(select)return;
			frame.visible = false;
		}
		override public function onMouseRollOver(event:MouseEvent):void
		{
			
			TipsManager.show(TipsConst.PLAYERCARDTIPSBYPLAYER,{data:data,type:1},20,10,true);
			if(select)return;
			frame.visible = true;
		}
//		override public function removeEvtListener():void
//		{
//			super.removeEvtListener();
//			this.removeEventListener(MouseEvent.ROLL_OUT,onMouseRollOut);
//			this.removeEventListener(MouseEvent.ROLL_OVER,onMouseRollOver);
//			this.removeEventListener(MouseEvent.CLICK,onMouseClick);
//		}
		/**
		 *更新buff状态 
		 * 
		 */
		override public function updataBuff():void
		{
			var vo:PlayerVo = data as PlayerVo;
			if(vo.status == 1)
			{
				buff.visible = false;
			}else
			{
				buff.visible = true;
			}
		}
		override public function destroyView():void
		{
//			removeEvtListener()
			super.destroyView();
		}
	}
}